package com.itheima.dao;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.itheima.bean.Category;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

/**
 * @author Tang
 * @date 2023/1/7
 */
@Mapper
public interface CategoryDao extends BaseMapper<Category> {
    @Select("select count(*) from category where name = #{name} and id != #{id}")
    int count(String name, Long id);

//    @Delete("update set is_deleted = 1 ")
}
